package com.haizhi.crm.biz.model;

import com.haizhi.crm.common.model.BaseDo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by yangyijun on 2018/5/16.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "tb_history_view" )
public class HistoryViewDo extends BaseDo {

    @Column(name = "action_type" )
    String actionType;

    @Column(name = "user_id" )
    Long userId;

    @Column(name = "entity_type" )
    String entityType;

    @Column(name = "entity_key" )
    String entityKey;

    @Column(name = "title" )
    String title;

    public HistoryViewDo(String entityType, String entityKey, String title) {
        this.entityType = entityType;
        this.entityKey = entityKey;
        this.title = title;
    }

    public HistoryViewDo(Long id, Long userId, String actionType, Long createdById, Date createdDt, Long updateById, Date updatedDt, String enabledFlag, String entityType, String entityKey, String title) {
        this.id = id;
        this.userId = userId;
        this.actionType = actionType;
        this.createdById = createdById;
        this.createdDt = createdDt;
        this.updateById = updateById;
        this.updatedDt = updatedDt;
        this.enabledFlag = enabledFlag;
        this.entityType = entityType;
        this.entityKey = entityKey;
        this.title = title;
    }
}
